﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DevExpress.Web.ASPxEditors;
using FlexySys.Common.Attributes;
using FlexySys.Common.Items;

namespace Web.Control.Item
{
    [CommonControl("TextBox", "", "Text,Enabled,Width,Height")]
    public class FlexyTextBox : ASPxTextBox, ICommonControl
    {
        public FlexyTextBox()
        {

        }

        public IDataItem DataItem
        {
            get
            {
                return new DataItem { ID = this.ID, Value = Text };
            }
            set
            {
                if (value != null && value.Value != null)
                    this.Text = value.Value.ToString();
            }
        }

    }
}